package com.swak.rpc;

import com.swak.exception.RpcException;

/**
 * Invoker.
 * 
 * @author lifeng
 *
 * @param <T>
 */
public interface Invoker<T> extends Node {

	/**
	 * get service interface.
	 *
	 * @return service interface.
	 */
	Class<T> getInterface();

	/**
	 * invoke.
	 *
	 * @param invocation
	 * @return result
	 * @throws RpcException
	 */
	Result invoke(Invocation invocation) throws RpcException;
}
